<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
 <head>
  <meta http-equiv="content-type" content="text/html; charset=UTF-8">
  <title>Rounds image corners</title>
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-base.css" />
<link media="all" rel="stylesheet" type="text/css" href="styles/03e73060321a0a848018724a6c83de7f-theme-medium.css" />

 </head>
 <body class="docs"><div class="navbar navbar-fixed-top">
  <div class="navbar-inner clearfix">
    <ul class="nav" style="width: 100%">
      <li style="float: left;"><a href="imagick.rotationalblurimage.html">« Imagick::rotationalBlurImage</a></li>
      <li style="float: right;"><a href="imagick.sampleimage.html">Imagick::sampleImage »</a></li>
    </ul>
  </div>
</div>
<div id="breadcrumbs" class="clearfix">
  <ul class="breadcrumbs-container">
    <li><a href="index.html">PHP Manual</a></li>
    <li><a href="class.imagick.html">Imagick</a></li>
    <li>Rounds image corners</li>
  </ul>
</div>
<div id="layout">
  <div id="layout-content"><div id="imagick.roundcorners" class="refentry">
 <div class="refnamediv">
  <h1 class="refname">Imagick::roundCorners</h1>
  <p class="verinfo">(PECL imagick 2, PECL imagick 3)</p><p class="refpurpose"><span class="refname">Imagick::roundCorners</span> &mdash; <span class="dc-title">Rounds image corners</span></p>

 </div>

 <div id="imagick.roundcorners-refsynopsisdiv">
   <div class="warning"><strong class="warning">警告</strong><p class="simpara">此函数在 Imagick 3.4.4 中被 <em class="emphasis">废弃</em>，强烈建议不要应用此函数。</p></div>
 </div>

 <div class="refsect1 description" id="refsect1-imagick.roundcorners-description">
  <h3 class="title">说明</h3>
  <div class="methodsynopsis dc-description">
   <span class="modifier">public</span> <span class="methodname"><strong>Imagick::roundCorners</strong></span>(<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$x_rounding</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$y_rounding</code></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$stroke_width</code><span class="initializer"> = 10</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$displace</code><span class="initializer"> = 5</span></span>,<br>&nbsp;&nbsp;&nbsp;&nbsp;<span class="methodparam"><span class="type">float</span> <code class="parameter">$size_correction</code><span class="initializer"> = -6</span></span><br>): <span class="type">bool</span></div>

  <p class="para rdfs-comment">
   Rounds image corners. The first two parameters control the amount 
   of rounding and the three last parameters can be used to fine-tune 
   the rounding process. 此方法在Imagick基于ImageMagick 6.2.9以上版本编译时可用。
   此方法在 Imagick 基于 ImageMagick 7.0.0 或以上版本编译时不可用。
  </p>
 </div>


 <div class="refsect1 parameters" id="refsect1-imagick.roundcorners-parameters">
  <h3 class="title">参数</h3>
  <p class="para">
   <dl>
    
     <dt>
<code class="parameter">x_rounding</code></dt>

     <dd>

      <p class="para">
       x rounding
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">y_rounding</code></dt>

     <dd>

      <p class="para">
       y rounding
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">stroke_width</code></dt>

     <dd>

      <p class="para">
        stroke width
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">displace</code></dt>

     <dd>

      <p class="para">
        image displace
      </p>
     </dd>

    
    
     <dt>
<code class="parameter">size_correction</code></dt>

     <dd>

      <p class="para">
        size correction
      </p>
     </dd>

    

   </dl>

  </p>
 </div>


 <div class="refsect1 returnvalues" id="refsect1-imagick.roundcorners-returnvalues">
  <h3 class="title">返回值</h3>
  <p class="para">
   成功时返回 <strong><code>true</code></strong>。
  </p>
 </div>


 <div class="refsect1 examples" id="refsect1-imagick.roundcorners-examples">
  <h3 class="title">范例</h3>
  <p class="para">
   <div class="example" id="example-2850">
    <p><strong>示例 #1 Using <span class="function"><strong>Imagick::roundCorners()</strong></span>:</strong></p>
    <div class="example-contents"><p>
     Rounds the image corners
    </p></div>
    <div class="example-contents">
<div class="phpcode"><code><span style="color: #000000">
<span style="color: #0000BB">&lt;?php<br /><br />$image&nbsp;</span><span style="color: #007700">=&nbsp;new&nbsp;</span><span style="color: #0000BB">Imagick</span><span style="color: #007700">();<br /></span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">newPseudoImage</span><span style="color: #007700">(</span><span style="color: #0000BB">100</span><span style="color: #007700">,&nbsp;</span><span style="color: #0000BB">100</span><span style="color: #007700">,&nbsp;</span><span style="color: #DD0000">"magick:rose"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">setImageFormat</span><span style="color: #007700">(</span><span style="color: #DD0000">"png"</span><span style="color: #007700">);<br /><br /></span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">roundCorners</span><span style="color: #007700">(</span><span style="color: #0000BB">5</span><span style="color: #007700">,</span><span style="color: #0000BB">3</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">$image</span><span style="color: #007700">-&gt;</span><span style="color: #0000BB">writeImage</span><span style="color: #007700">(</span><span style="color: #DD0000">"rounded.png"</span><span style="color: #007700">);<br /></span><span style="color: #0000BB">?&gt;</span>
</span>
</code></div>
    </div>

   </div>
  </p>
 </div>


</div></div></div></body></html>